#ifndef REGISTERDIALOG_H
#define REGISTERDIALOG_H

#include <QDialog>
#include <QPixmap>


namespace Ui {
class RegisterDialog;
}

class RegisterDialog : public QDialog
{
    Q_OBJECT

public:
    explicit RegisterDialog(QWidget *parent = nullptr);
    ~RegisterDialog();

private:
    Ui::RegisterDialog *ui;

    int m_shadowWidth;   // 窗体的阴影边框宽度
    int m_radius;  // 圆角半径

    QPixmap m_shadowCache;  // 缓存窗口阴影，省略阴影计算，提高渲染速度
    QPixmap m_backgroundCache;  // 缓存背景图片,省略文件读取操作，提高渲染速度


signals:
    void sendRegisterInfo(const QString email, const QString nickname, const QString password);

protected:
    void paintEvent(QPaintEvent *event) override;
    void resizeEvent(QResizeEvent *event) override;


private slots:
    void on_Btn_BackToLogin_clicked();
    void on_Btn_Submit_clicked();
    void DealRegisterResponseMessage(const QString status, const QString reason, const QString userId);
};

#endif // REGISTERDIALOG_H
